package farmaweb

abstract class PessoaJuridica implements Serializable {

    String razaoSocial
    String cnpj
    String inscricaoEstadual
    String fone
    String fax
    String email
    String pessoaContato
    String logradouro
    String numero
    String complemento
    String bairro
    String cidade
    String uf
    String cep

    static constraints = {
        cnpj(cnpj:true, nullable: false, blank: false, maxSize: 18, unique: true)
        razaoSocial(nullable: false, blank: false, maxSize: 50)
        inscricaoEstadual(nullable: true, blank: true, maxSize: 18)
        fone(nullable: true, blank: true, maxSize: 14)
        fax(nullable: true, blank: true, maxSize: 14)
        email(nullable: true, blank: true, email: true)
        pessoaContato(nullable: true, blank: true, maxSize: 50)
        logradouro(nullable: true, blank: true, maxSize: 50)
        numero(nullable: true, blank: true, maxSize: 5)
        complemento(nullable: true, blank: true, maxSize: 25)
        bairro(nullable: true, blank: true, maxSize: 25)
        cidade(nullable: true, blank: true, maxSize: 30)
        uf(nullable: true, blank: true, maxSize: 2)
        cep(nullable: true, blank: true, maxSize: 9)
    }

    static mapping = {
        tablePerSubclass(true)
        tablePerHierarchy(false)
    }
}
